<?php

namespace tjsd\system;

/**
 * 
 * 
 * @author Jakub Tesárek <info@tjsd.cz>
 * @copyright 2012
 * @version 1.0
 */
class Application extends \tjsd\core\Object {
	protected $serviceContainer;
	
	public function __construct(\tjsd\system\di\ServiceContainer $serviceContainer) {
		$this->serviceContainer = $serviceContainer;
	}
	
	public function run() {
		$controllerFactory = $this->serviceContainer->getControllerFactory();
		$controller = $controllerFactory->createController('index', $this->serviceContainer);
		$controller->invoke();
		$this->shutdown();
	}
	
	public function shutdown() {
		
	}
}

